<?php

class Core_Form_Admin_Settings_Social extends Core_Form_Admin_Settings_Abstract{
    
    public function init(){
        $this->setTitle('social networks integration settings');
        
        $this->setDescription('core.form.admin.social.desc');
        
        // facebook enabled
        $this -> addElement('radio', 'facebook_enable', array(
            'require' => 1,
            'value' => 'off',
            'label' => 'enable facebook',
            'multiOptions' => array(
                'on' => 'yes, enable facebook',
                'off' => 'no, disable facebook',
            ),
            'description' => 'core.form.admin.facebook.desc'
        ));
        
        // facebook app id
        $this->addElement('text','facebook_appid',array(
            'require'=>0,
            'value'=>'',
            'class'=>'text long-text',
            'label'=>'facebook application id',
            'description'=>'core.form.admin.facebook.appid.desc'
        ));
        
        // facebook secret
        $this->addElement('text','facebook_secret',array(
            'require'=>0,
            'value'=>'',
            'class'=>'text long-text',
            'label'=>'facebook secret key',
            'description'=>'core.form.admin.facebook.secret.desc'
        ));
        
        // twitter enabled
        $this -> addElement('radio', 'twitter_enable', array(
            'require' => 1,
            'value' => 'off',
            'label' => 'enable twitter',
            'multiOptions' => array(
                'on' => 'yes, enable twitter',
                'off' => 'no, disable twitter',
            ),
            'description' => 'core.form.admin.twitter.desc'
        ));
        
        // twitter key
        $this->addElement('text','twitter_key',array(
            'require'=>0,
            'value'=>'',
            'class'=>'text long-text',
            'label'=>'twitter comsummer key',
            'description'=>'core.form.admin.twitter.key.desc'
        ));
        
        // twitter secret
        $this->addElement('text','twitter_secret',array(
            'require'=>0,
            'value'=>'',
            'class'=>'text long-text',
            'label'=>'twitter comsummer secret',
            'description'=>'core.form.admin.facebook.secret.desc'
        ));
        
        // google + enabled
        $this -> addElement('radio', 'googleplus_enable', array(
            'require' => 1,
            'value' => 'off',
            'label' => 'enable google+',
            'multiOptions' => array(
                'on' => 'yes, enable google + ',
                'off' => 'no, disable google +',
            ),
            'description' => 'core.form.admin.googleplus.desc'
        ));
        
        // googleplus key
        $this->addElement('text','googleplus_key',array(
            'require'=>0,
            'value'=>'',
            'class'=>'text long-text',
            'label'=>'google plus comsummer key',
            'description'=>'core.form.admin.googleplus.key.desc'
        ));
        
        // googleplus secret
        $this->addElement('text','googleplus_secret',array(
            'require'=>0,
            'value'=>'',
            'class'=>'text long-text',
            'label'=>'google plus comsummer secret',
            'description'=>'core.form.admin.googleplus.secret.desc'
        ));
        
        // yahoo enabled
        $this -> addElement('radio', 'yahoo_enable', array(
            'require' => 1,
            'value' => 'off',
            'label' => 'enable yahoo',
            'multiOptions' => array(
                'on' => 'yes, enable yahoo.',
                'off' => 'no, disable yahoo.',
            ),
            'description' => 'core.form.admin.yahoo.desc'
        ));
        
        // yahoo key
        $this->addElement('text','yahoo_key',array(
            'require'=>0,
            'value'=>'',
            'class'=>'text long-text',
            'label'=>'yahoo comsummer key',
            'description'=>'core.form.admin.yahoo.key.desc'
        ));
        
        // yahoo secret
        $this->addElement('text','yahoo_secret',array(
            'require'=>0,
            'value'=>'',
            'class'=>'text long-text',
            'label'=>'yahoo comsummer secret',
            'description'=>'core.form.admin.yahoo.secret.desc'
        ));
        
        
        // zing enabled
        $this -> addElement('radio', 'zing_enable', array(
            'require' => 1,
            'value' => 'off',
            'label' => 'enable zing',
            'multiOptions' => array(
                'on' => 'yes, enable zing.',
                'off' => 'no, disable zing.',
            ),
            'description' => 'core.form.admin.zing.desc'
        ));
        
        // zing key
        $this->addElement('text','zing_key',array(
            'require'=>0,
            'value'=>'',
            'class'=>'text long-text',
            'label'=>'zing comsummer key',
            'description'=>'core.form.admin.zing.key.desc'
        ));
        
        // zing secret
        $this->addElement('text','zing_secret',array(
            'require'=>0,
            'value'=>'',
            'class'=>'text long-text',
            'label'=>'zing comsummer secret',
            'description'=>'core.form.admin.zing.secret.desc'
        ));
        
        // init submit
        $this -> addElement('button', '_submit', array(
                'label' => 'save change',
                'type' => 'submit',
                'class' => 'submit',
                'decorators' => array('ViewHelper')
        ));
        
        // init _test
        $this -> addElement('button', '_test', array(
                'label' => 'test settings',
                'type' => 'button',
                'class' => 'submit',
                'decorators' => array('ViewHelper')
        ));
        
        // init submit
        $this -> addElement('button', '_cancel', array(
                'label' => 'cancel',
                'type' => 'submit',
                'class' => 'cancel',
                'decorators' => array('ViewHelper')
        ));

        $this -> addDisplayGroup(array(
                '_submit',
                '_test',
                '_cancel'
        ), '_buttons');
    }
}
